import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';

import { BrowserRouter as Router } from 'react-router-dom'

// 导入
import 'antd/dist/reset.css';

// 导入仓库
import { store, persistor } from '@/store';
//如果使用React,则使用 PersistGate 包裹根组建
import { PersistGate } from 'redux-persist/lib/integration/react';
import { Provider } from 'react-redux';

// 配置中文国际化
import { ConfigProvider } from 'antd';
// 导入中文包
import zhCN from 'antd/lib/locale/zh_CN';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
    <Provider store={store}>
        <Router>
            <PersistGate loading={null} persistor={persistor}>
                <ConfigProvider locale={zhCN}>
                    <App />
                </ConfigProvider>  
            </PersistGate>
        </Router>
    </Provider>
);


